﻿<navigation:Page x:Class="GranitePackageSystem.Views.Request.PackageDetails" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
           xmlns:layoutToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit"
           xmlns:dataInput="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input"
           d:DesignWidth="1024" d:DesignHeight="800" MaxWidth="1024"
           Title="PackageDetails Page">
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="10" />
            <RowDefinition Height="333*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="250" />
            <ColumnDefinition Width="550*" />
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.ColumnSpan="2" Margin="10" Name="panelTitle">
            <TextBlock Text="Package Details" FontSize="18" FontWeight="Bold" HorizontalAlignment="Center" />
        </StackPanel>
        <StackPanel Grid.Row="1" Name="panelLandingNav" Margin="10,10,10,0" Background="#FF484848" Height="Auto" VerticalAlignment="Top" Width="200" HorizontalAlignment="Center">
            <HyperlinkButton x:Name="linkHome" NavigateUri="/Home" TargetName="ContentFrame" Content="Dashboard" Style="{StaticResource LinkStyle}" Background="{x:Null}" AllowDrop="True" HorizontalContentAlignment="Left" Margin="16,0,0,0"/>
            <controlsToolkit:Expander ExpandDirection="Down" Name="expanderRequest" Visibility="Visible" IsExpanded="True">
                <controlsToolkit:Expander.Header>
                    <TextBlock Text="Current Request" FontSize="12" Foreground="White" TextAlignment="Left" Name="expanderHeader" />
                </controlsToolkit:Expander.Header>
                <controlsToolkit:Expander.Content>
                    <StackPanel HorizontalAlignment="Right" Margin="30,0,0,0" Width="AUTO">
                        <HyperlinkButton x:Name="linkTestingDetails" NavigateUri="/Request/TestingDetails" TargetName="ContentFrame" Content="• Testing Environment" Margin="0,0,5,0" Style="{StaticResource LinkStyle}" HorizontalContentAlignment="Left" Visibility="Visible" />
                        <HyperlinkButton x:Name="linkPackageDetails" NavigateUri="/Request/PackageDetails" TargetName="ContentFrame" Content="• Package Details" Margin="0,0,5,0" Style="{StaticResource LinkStyle}" HorizontalContentAlignment="Left" Visibility="Visible" Foreground="#FF42A1F5" />
                        <HyperlinkButton x:Name="linkLicensingDetails" NavigateUri="/Request/Licensing" TargetName="ContentFrame" Content="• Licensing Details" Margin="0,0,5,0" Style="{StaticResource LinkStyle}" HorizontalContentAlignment="Left" Visibility="Collapsed" />
                        <HyperlinkButton x:Name="linkSummaryDetails" NavigateUri="/Request/RequestSummary" TargetName="ContentFrame" Content="• Request Summary" Margin="0,0,5,0" Style="{StaticResource LinkStyle}" HorizontalContentAlignment="Left" Visibility="Collapsed" />
                    </StackPanel>
                </controlsToolkit:Expander.Content>
            </controlsToolkit:Expander>
        </StackPanel>
        <StackPanel Name="panelMainContent" Grid.Column="1" Grid.Row="1">
            <Image Name="image" Source="/GranitePackageSystem;component/Assets/Resources/VDIActions.png" />
            <StackPanel Name="panelLoadButton" Grid.Column="1" Grid.Row="1" Visibility="Visible" Margin="10">
            <Button Name="btn_LoadData" Content="Load Add Remove Data" Click="btn_LoadData_Click" Width="300" />
        </StackPanel>
            <controlsToolkit:BusyIndicator Name="BusyIndicatorBuildStack">
                <StackPanel>
                    <StackPanel Orientation="Horizontal" Name="panelPackageSaved" Visibility="Collapsed">
                        <TextBlock Text="Successfully Saved Package Data" Width="200" VerticalAlignment="Center" />
                        <Button Content="Modify Package Data" Margin="10" Width="125" Name="btnModifyPackageData" Click="btnModifyPackageData_Click" />
                    </StackPanel>
                </StackPanel>
            </controlsToolkit:BusyIndicator>
            <StackPanel Name="panelContent" Grid.Column="1" Grid.Row="1" Visibility="Collapsed">
                <controlsToolkit:BusyIndicator x:Name="busyIndicatorPackage">
                    <StackPanel>
                        <StackPanel Orientation="Horizontal" Name="panelARPBrowser">
                            <StackPanel>
                                <ListBox x:Name="RegistryEntryList" Width="300" Height="300">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <TextBlock Text="{Binding DisplayName}">
                                            </TextBlock>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                    <ListBox.ItemContainerStyle>
                                        <Style TargetType="ListBoxItem">
                                            <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
                                        </Style>
                                    </ListBox.ItemContainerStyle>
                                </ListBox>
                            </StackPanel>
                            <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled" Width="450">
                                <StackPanel Orientation="Horizontal">
                                    <StackPanel>
                                        <TextBlock Text="Display Name:  " />
                                        <TextBlock Text="Publisher:  " />
                                        <TextBlock Text="Version:  " />
                                        <TextBlock Text="Estimated Size:  " />
                                        <TextBlock Text="Uninstall String:  " />
                                    </StackPanel>
                                    <StackPanel>
                                        <TextBlock Name="blockDisplayName" Text="{Binding SelectedItem.DisplayName, ElementName=RegistryEntryList}" />
                                        <TextBlock Name="blockPublisher" Text="{Binding SelectedItem.Publisher, ElementName=RegistryEntryList}" />
                                        <TextBlock Name="blockVersion" Text="{Binding SelectedItem.Version, ElementName=RegistryEntryList}" />
                                        <TextBlock Name="blockEstimatedSize" Text="{Binding SelectedItem.EstimatedSize, ElementName=RegistryEntryList}" />
                                        <TextBlock Name="blockUinstallString" Text="{Binding SelectedItem.UninstallString, ElementName=RegistryEntryList}" />
                                    </StackPanel>
                                </StackPanel>
                            </ScrollViewer>
                        </StackPanel>
                        <Button Content="Use Selected Entry" Width="175" Margin="10" Name="btnUseSelected" Click="btnUseSelected_Click" />
                        <StackPanel Name="panelPackageInformation" Orientation="Horizontal" Visibility="Collapsed">
                            <StackPanel>
                                <TextBlock Text="Package Name:  "  Height="23" Margin="2" />
                                <TextBlock Text="Package Publisher:  "  Height="23" Margin="2" />
                                <TextBlock Text="Package Version:  "  Height="23" Margin="2" />
                                <TextBlock Text="Package Source Files Location:  "  Height="23" Margin="2" />
                                <TextBlock Text="Package Source File Hash Value:  "  Height="23" Margin="2" />
                                <TextBlock Text="Package Size (MB):  "  Height="23" Margin="2" />
                                <TextBlock Text="Uninstall String:  "  Height="23" Margin="2" />
                                <TextBlock Text="Package Comments:  "  Height="23" Margin="2" />
                            </StackPanel>
                            <StackPanel Width="560" Name="panelPackageInfo">
                                <TextBox Name="boxPackageName" Height="23" Width="556" Margin="2" Text="{Binding PackageName, Mode=TwoWay, ValidatesOnExceptions=True, ValidatesOnDataErrors=True, NotifyOnValidationError=True}" HorizontalAlignment="Left" BindingValidationError="boxPackageName_BindingValidationError" />
                                <dataInput:DescriptionViewer Target="{Binding ElementName=boxPackageVersion}" BindingValidationError="boxPackageVersion_BindingValidationError"/>
                                <TextBox Name="boxPackagePublisher" Height="23" Width="556" Margin="2" Text="{Binding PackagePublisher, Mode=TwoWay, ValidatesOnExceptions=True, ValidatesOnDataErrors=True, NotifyOnValidationError=True}" HorizontalAlignment="Left" BindingValidationError="boxPackagePublisher_BindingValidationError" />
                                <dataInput:DescriptionViewer Target="{Binding ElementName=boxPackageVersion}" BindingValidationError="boxPackageVersion_BindingValidationError"/>
                                <TextBox Name="boxPackageVersion" Height="23" Width="556" Margin="2" Text="{Binding PackageVersion, Mode=TwoWay, ValidatesOnExceptions=True, ValidatesOnDataErrors=True, NotifyOnValidationError=True}" HorizontalAlignment="Left" BindingValidationError="boxPackageVersion_BindingValidationError" />
                                <dataInput:DescriptionViewer Target="{Binding ElementName=boxPackageVersion}" BindingValidationError="boxPackageVersion_BindingValidationError"/>
                                <TextBox Name="boxPackageSourceFileLocation" Height="23" Margin="2" />
                                <TextBox Name="boxPackageSourceFileHash" Height="23" Margin="2" />
                                <TextBox Name="boxPackageSize" Text="{Binding PackageSize}" Height="23" Margin="2" />
                                <TextBox Name="boxUninstallString" Text="{Binding PackageUninstallString}" Height="23" Margin="2" />
                                <TextBox Name="boxPackageComments" Text="{Binding PackageComments}" Height="23" Margin="2" />
                            </StackPanel>
                        </StackPanel>
                    </StackPanel>
                </controlsToolkit:BusyIndicator>
                <Button Name="btnSavePackageDetails" Content="Save Package Details" Width="175" HorizontalAlignment="Right" IsEnabled="False" Click="btnSavePackageDetails_Click" />
                <Button Name="btnNext" Content="Next" Width="175" HorizontalAlignment="Right" IsEnabled="False" Visibility="Collapsed" Click="btnNext_Click" />
            </StackPanel>
        </StackPanel>
        <Border BorderBrush="Silver" BorderThickness="1" Grid.RowSpan="4" Grid.ColumnSpan="3" Name="border1">
        </Border>
    </Grid>
</navigation:Page>
